﻿using StackExchange.Redis;
using System;
using System.Collections.Generic;
using System.Text;

namespace Singer.Middleware.Redis
{
    public interface IRedisConnectionPool : IDisposable
    {
        IConnectionMultiplexer GetConnection(string connectionName);
        /// <summary>
        /// 获取指定连接的IDatabase
        /// </summary>
        /// <param name="db">dbId</param>
        /// <param name="connectionName">redis连接名，默认为Default</param>
        IDatabase GetDatabase(int db = -1, string? connectionName = null);
    }
}
